package Test;

import java.net.ServerSocket;
import java.net.Socket;

public class Tcpread {
	public static void main(String[] args) {
		System.out.println("begin");
		try {
			ServerSocket ss = new ServerSocket(4002);
			boolean bRunning = true;
			while (bRunning) {
				Socket s = ss.accept();
				new Thread(new ServicerRead(s)).start();
				System.out.println(s.getRemoteSocketAddress());
			}
			ss.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
